 {layout name="layout" /}
<!-- Main content -->
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header with-border">
                {if condition="isset($data)"}
                <h3 class="box-title">修改内容分类</h3> {else /}
                <h3 class="box-title">新增内容分类</h3> {/if}
            </div>
            <!-- /.box-header -->
            <div class="box-body">
                <form class="form-horizontal ingeAjax" action="{if condition=" isset($data.term_id) "}{:url('home/Term/go_edit','id='.$data['term_id'])}{else /}{:url('home/Term/go_add')}{/if}" method="post">
                    <div class="space-2"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 上级:</label>
                        <div class="col-sm-10">
                            <select name="term_pid" class="select2 form-group-new  col-xs-12 col-sm-4">
                                <option value="0">作为一级分类</option>
                                {$menulist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 分类名称： </label>
                        <div class="col-sm-10">
                            <input type="text" name="name" value="{$data.name|default=''}" class="form-group-new  col-xs-12 col-sm-4" placeholder="请输入权限组名称" required/>
                            <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="red">*</span>必填</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 分类名称： </label>
                        <div class="col-sm-10">
                            <textarea name="description" class="form-group-new  col-xs-12 col-sm-4">{$data.description|default=''}</textarea>
                        </div>
                    </div>
                    <div class="form-actions">
                        <div class="col-md-offset-3 col-md-9">
                            <button class="btn btn-primary" type="submit">
                                <i class="fa fa-check bigger-110"></i> 保存
                            </button> &nbsp; &nbsp; &nbsp; {if condition="isset($data)"}
                            <button class="btn" type="reset" onclick="history.go(-1);"><i class="fa fa-undo"></i> 返回</buttton>{else /}
                                <button class="btn" type="reset"><i class="fa fa-undo bigger-110"></i> 重置</buttton>{/if}
                        </div>
                    </div>
                    <div class="space"></div>
                </form>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
<!-- /.row -->
</section>
{include file="public/base" /} {include file="public/edit" /} {include file="public/footer" /}
</body>

</html>
